package 设计模式.职责链模式;

public class Client {
    public static void main(String[] args) {
        PurchaseRequest request = new PurchaseRequest(1, 3000, 1);

        Approver departmentApprover = new DepartmentApprover("张主任");
        Approver collegeApprover = new CollegeApprover("李院长");
        Approver viceSchoolMasterApprover = new ViceSchoolMasterApprover("巨副校长");
        Approver schoolMasterApprover = new SchoolMasterApprover("李校长");

        departmentApprover.setApprover(collegeApprover);
        collegeApprover.setApprover(viceSchoolMasterApprover);
        viceSchoolMasterApprover.setApprover(schoolMasterApprover);

        departmentApprover.processRequest(request);
    }
}
